/**
 * 
 */
package com.cqcis.uip.module.salary.oper.dao;

import java.util.List;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

import com.cqcis.uip.base.framework.utils.JdbcUtil;
import com.cqcis.uip.module.salary.oper.domain.ContractDetail;

/**
 * @author 李世军
 *
 * 创建于 2012-3-9 下午02:46:20
 */
public class ContractDetailDao extends JdbcDaoSupport {

	private static String CONTRACT_DETAIL_SQL = " select t.id, t.training_contract_id, t.grade_id, t.course_id, t.study_type, t.course_times,t.old_price, "
		+ " t.current_price, t.rebate,t.total_prices, t.pay_prices, t.pay_card_prices, t.course_times_week ,(pay_prices+(pay_card_prices*0.99)) as real_total_prices  " 
		+ " from customercontrol_trainingcontractdetail as t where t.training_contract_id = ?  " ;
	
	/**
	 * 获取指定合同明细
	 * @param trainingContractId
	 * @return
	 */
	public List<ContractDetail> findContractDetail(String trainingContractId){
		return JdbcUtil.queryForList(this, ContractDetail.class, CONTRACT_DETAIL_SQL, trainingContractId) ;
	}
}
